package com.gitee.jjnnzb.designpatterndemo.handler.impl;

import com.gitee.jjnnzb.designpatterndemo.handler.UrlHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Service;

/**
 * @author Jjn
 * @since 2023/3/6 18:16
 */
@Slf4j
@Order
@Service
public class DefaultHandler implements UrlHandler {
    
    
    @Override
    public boolean apply(String url) {
        return true;
    }
    
    @Override
    public void handle(String url) {
        if (log.isInfoEnabled()) {
            log.info("url:{}是其他类型的链接,执行默认的处理策略", url);
        }
    }
    
}
